import axios from '@/libs/api.request'

export const list = (path) => {
  return axios.request({
    url: '/oss/file/list?path=' + path,
    method: 'get'
  })
}

export const addFile = (obj) => {
  return axios.request({
    url: '/oss/file/add',
    method: 'post',
    data: obj
  })
}

export const rename = (obj) => {
  return axios.request({
    url: '/oss/file/rename',
    method: 'post',
    data: obj
  })
}

export const deleteFile = (id) => {
  return axios.request({
    url: '/oss/file/delete',
    method: 'post',
    data: id
  })
}
